// Thomas Radloff, http://firecloud.com, 2008 

import mx.core.UIComponent;
private var ppv:PPView;

private function onCreationComplete():void {

  ppv = new PPView();

  // By default, show the axes
  ppv.fShowAxes = true;
  this.chkShowAxes.selected = true;

  // these 3 lines are key to putting Papervision in Flex
  var uicomp:UIComponent = new UIComponent();
  cvsPPV.addChild( uicomp );
  uicomp.addChild( ppv );

  // Connect the cube in the model with the
  do3dCubeInner.setDO3D(ppv.cubeInner, ppv.cubeInnerAxes);
  do3dCubeOuter.setDO3D(ppv.cubeOuter, ppv.cubeOuterAxes);
}